<template>
 <h1>
   员工简历练习
   <table>
     <tr>
       <td>图片</td>
       <td><img :src="intro.imgURL" alt=""></td>
     </tr>
     <tr>
       <td>姓名</td>
       <td>{{intro.name}}</td>
     </tr>
     <tr>
       <td>年龄</td>
       <td>{{intro.age}}</td>
     </tr>
     <tr>
       <td>朋友 </td>
       <td>
         <ul>
           <li v-for="item in intro.friends">{{item}}</li>
         </ul>
       </td>
     </tr>
   </table>

   <button @click="loadData"></button>


 </h1>
</template>
<script setup>
import {ref} from "vue";
const intro = ref(
    {
      imgURL : "",
      name : "",
      age : "",
      friends :[]
    }
)

const loadData = ()=>
{
  intro.value={
    imgURL :'',
    name : 'xx',
    age : '33' ,
    friends : ['rose','tome','xxx']

  }
}

</script>


<style scoped>

</style>